package com.ch.common.base.fragment

import android.os.Bundle
import android.util.Log
import android.view.View
import androidx.databinding.ViewDataBinding
import com.alibaba.android.arouter.launcher.ARouter
import com.ch.common.base.viewModel.BaseViewModel

abstract class BaseFragment<VM : BaseViewModel, DB : ViewDataBinding> : BaseLibFragment<VM, DB>() {

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        bindViewModel()
        super.onViewCreated(view, savedInstanceState)
    }

    /**
     * TODO 必须把viewModel与DataBinding绑定起来，不然数据为空，无作用
     * */
    abstract fun bindViewModel()
}